import { request } from "../utils/request";

export const getSwipersDataApi = () => {
	return request({
		url: 'home/swiperdata',
		method: 'GET',
	})
}

export const getCatitemsDataApi = () => {
	return request({
		url: 'home/catitems',
		method: 'GET',
	})
}

export const getFloorDataApi = () => {
	return request({
		url: 'home/floordata',
		method: 'GET',
	})
}


export const getCategoriesApi = () => {
	return request({
		url: 'categories',
		method: 'GET',
	})
}

export const getSearchResultApi = (data) => {
	return request({
		url: 'goods/qsearch',
		method: 'GET',
		data
	})
}

export const getGoodsListApi = (data, isTip) => {
	return request({
		url: 'goods/search',
		method: 'GET',
		data,
		isTip
	})
}

export const getGoodsDetailApi = (data) => {
	return request({
		url: 'goods/detail',
		method: 'GET',
		data
	})
}

export const wxLoginApi = (data) => {
	return request({
		url: 'users/wxlogin',
		method: 'POST',
		data
	})
}

export const orderCreateApi = (data) => {
	return request({
		url: 'my/orders/create',
		method: 'POST',
		data
	})
}